package com.ad.pet.app.main.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ad.pet.R;
import com.ad.pet.models.remote.main.Drawer;

import java.util.List;

/**
 * Created by SEELE on 2018/8/30.
 */

public class DrawerAdapter extends BaseQuickAdapter<Drawer,BaseViewHolder>{


    public DrawerAdapter( @Nullable List<Drawer> data) {
        super(R.layout.item_drawaer_layout, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, final Drawer item) {
        TextView tvTitle = helper.getView(R.id.tv_title);
        ImageView ivHead = helper.getView(R.id.iv_head);
        ivHead.setImageResource(item.getDrawable());
        switch (item.getType()){
            case 0:
                tvTitle.setText(mContext.getString(R.string.langue_chose));

                break;
            case 1:

                tvTitle.setText(mContext.getString(R.string.country_setting));
                break;
            case 2:

                tvTitle.setText(mContext.getString(R.string.money_type_chose));
                break;
            case 3:
                tvTitle.setText("新手指南");


        }


    }
}
